RoomContainer

interface RoomContainer

This module is used to manage a room container A room container can hold some rooms

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val containers: MutableList<Container>

The list of the containers fetched on the server Automatically updated when a container is created or deleted on another platform

Link copied to clipboard
abstract val containersAsLiveData: LiveData<List<Container>>

An observable LiveData of the containers list

Functions

Link copied to clipboard
abstract fun addRoomsToContainer(containerId: String, roomIds: List<String>, listener: RainbowListener<Pair<Container, List<InvalidRoom>?>, RoomContainerRepository.ContainerError>? = null)

Adds all of the room of the specified list of room ids to the container identified by the containerId

Link copied to clipboard
abstract fun createContainer(name: String, description: String? = null, roomIds: List<String>? = null, listener: RainbowListener<Pair<Container, List<InvalidRoom>?>, RoomContainerRepository.ContainerError>? = null)

Creates a container with the specified parameters

Link copied to clipboard
abstract fun deleteContainer(containerId: String, listener: RainbowListener<Container, RoomContainerRepository.ContainerError>? = null)

Deletes a container identified by the given containerId

Link copied to clipboard
abstract fun deleteContainers(containerIds: List<String>, listener: RainbowListener<Map<String, RainbowError<RoomContainerRepository.ContainerError>>, RoomContainerRepository.ContainerError>? = null)

Deletes containers identified by the given list of container id

Link copied to clipboard
abstract fun fetchContainerById(containerId: String, listener: RainbowListener<Container, RoomContainerRepository.ContainerError>? = null)

Fetch a container identified by the given containerId on the server

Link copied to clipboard
abstract fun fetchContainers(limit: Int = 100, offset: Int = 0, sortOrder: Int = 1, listener: RainbowListener<List<Container>, RoomContainerRepository.ContainerError>? = null)

Fetch a container list on the server

Link copied to clipboard
abstract fun fetchRoomsForContainerIfNeeded(container: Container, listener: RainbowListener<List<IRainbowRoom>, Unit>?)

Fetch all Bubbles from a container

Link copied to clipboard
abstract fun getContainerById(containerId: String): Container?

Returns the container corresponding to the given containerId, or null if such id is not present in the list

Link copied to clipboard
abstract fun moveRooms(oldContainerId: String, newContainerId: String, roomIds: List<String>, listener: RainbowListener<Pair<Container, List<InvalidRoom>?>, RoomContainerRepository.ContainerError>? = null)

Moves all of the room of the specified list of room ids from a container to another

Link copied to clipboard
abstract fun removeRoomsToContainer(containerId: String, roomIds: List<String>, listener: RainbowListener<Pair<Container, List<InvalidRoom>?>, RoomContainerRepository.ContainerError>? = null)

Removes all of the room of the specified list of room ids to the container identified by the containerId

Link copied to clipboard
abstract fun updateContainer(containerId: String, newName: String, newDescription: String? = null, listener: RainbowListener<Container, RoomContainerRepository.ContainerError>? = null)

Updates a container identified by the given containerId